From: Khalid Abu Shawarib Date: Mon, 25 Aug 2025 18:08:54 +0000 (+0300) Subject: search: Make overview application search results grid RTL aware X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~95^2^2~20 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=92dc36e7fe14c0e8fba8b297d6a9674f16a7d6be;p=gnome-shell.git search: Make overview application search results grid RTL aware Part-of: --- diff --git a/js/ui/search.js b/js/ui/search.js index 3204ea0b6..d7f1df394 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -399,6 +399,7 @@ const GridSearchResultsLayout = GObject.registerClass({ vfunc_allocate(container, box) { const width = box.get_width(); + const ltr = container.get_text_direction() !== Clutter.TextDirection.RTL; const childBox = new Clutter.ActorBox(); let accumulatedWidth = 0; @@ -416,7 +417,11 @@ const GridSearchResultsLayout = GObject.registerClass({ const [childWidth] = child.get_preferred_width(-1); const [childHeight] = child.get_preferred_height(-1); - childBox.set_origin(accumulatedWidth, 0); + if (ltr) + childBox.set_origin(accumulatedWidth, 0); + else + childBox.set_origin(width - accumulatedWidth - childWidth, 0); + accumulatedWidth += childWidth; if (accumulatedWidth <= width)